# Make file for Scintilla on Windows
# Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>
# The License.txt file describes the conditions under which this software may be distributed.


.SUFFIXES: .cxx
CC = DMC
LINK = link
LIBR = lib
DEL = del /q

SCILIB = sci.lib
COMPONENT=Scintilla.dll
LEXCOMPONENT=SciLexer.dll

vpath %.h ../src ../include
vpath %.cxx ../src

INCLUDEDIRS=-I../include -I../src -IZ:/dm/stlport
CXXBASEFLAGS=$(INCLUDEDIRS) -Ae -DSTRICT

ifdef DEBUG
CXXFLAGS=-DDEBUG $(CXXBASEFLAGS)
else
CXXFLAGS=-DNDEBUG $(CXXBASEFLAGS)
endif

ALL: $(COMPONENT) $(LEXCOMPONENT) ScintillaWinS.obj WindowAccessor.obj

%.obj:  %.cxx
	$(CC) $(CXXFLAGS) -c $<

clean:
	$(DEL) *.obj *.obj *.res *.map


#++Autogenerated -- run src/LexGen.py to regenerate
#**LEXOBJS=\\\n\(\*.obj \)
LEXOBJS=\
	LexAbaqus.obj LexAda.obj LexAPDL.obj LexAsm.obj LexAsn1.obj LexASY.obj LexAU3.obj LexAVE.obj \
	LexBaan.obj LexBash.obj LexBasic.obj LexBullant.obj LexCaml.obj LexCLW.obj LexCmake.obj \
	LexCOBOL.obj LexConf.obj LexCPP.obj LexCrontab.obj LexCsound.obj LexCSS.obj LexD.obj \
	LexEiffel.obj LexErlang.obj LexEScript.obj LexFlagship.obj LexForth.obj LexFortran.obj \
	LexGAP.obj LexGui4Cli.obj LexHaskell.obj LexHTML.obj LexInno.obj LexKix.obj LexLisp.obj \
	LexLout.obj LexLua.obj LexMagik.obj LexMarkdown.obj LexMatlab.obj LexMetapost.obj \
	LexMMIXAL.obj LexMPT.obj LexMSSQL.obj LexMySQL.obj LexNimrod.obj LexNsis.obj LexOpal.obj \
	LexOthers.obj LexPascal.obj LexPB.obj LexPerl.obj LexPLM.obj LexPOV.obj LexPowerPro.obj \
	LexPowerShell.obj LexProgress.obj LexPS.obj LexPython.obj LexR.obj LexRebol.obj LexRuby.obj \
	LexScriptol.obj LexSmalltalk.obj LexSML.obj LexSorcus.obj LexSpecman.obj LexSpice.obj \
	LexSQL.obj LexTACL.obj LexTADS3.obj LexTAL.obj LexTCL.obj LexTeX.obj LexVB.obj LexVerilog.obj \
	LexVHDL.obj LexYAML.obj
#--Autogenerated -- end of automatically generated section

SOBJS	= ScintillaWin.obj ScintillaBase.obj Editor.obj CharClassify.obj Decoration.obj \
	Document.obj ContractionState.obj CellBuffer.obj CallTip.obj \
	PlatWin.obj PositionCache.obj KeyMap.obj Indicator.obj LineMarker.obj RESearch.obj RunStyles.obj \
	Selection.obj Style.obj ViewStyle.obj AutoComplete.obj UniConversion.obj PropSet.obj XPM.obj PerLine.obj

LOBJS	= ScintillaWinL.obj ScintillaBaseL.obj Editor.obj CharClassify.obj Decoration.obj \
	Document.obj ContractionState.obj CellBuffer.obj CallTip.obj \
	PlatWin.obj PositionCache.obj KeyMap.obj Indicator.obj LineMarker.obj RESearch.obj RunStyles.obj \
	Selection.obj Style.obj ViewStyle.obj AutoComplete.obj UniConversion.obj KeyWords.obj \
	DocumentAccessor.obj PropSet.obj ExternalLexer.obj StyleContext.obj XPM.obj PerLine.obj $(LEXOBJS)

$(SCILIB): $(LOBJS)
	$(LIBR) -n -p256 -c $@ $^

# These dependencies are maintained by hand as they do not use the default output name
ScintillaBaseL.obj: ScintillaBase.cxx Platform.h Scintilla.h SciLexer.h \
	ContractionState.h CellBuffer.h CallTip.h KeyMap.h Indicator.h \
	LineMarker.h Style.h AutoComplete.h ViewStyle.h Document.h Editor.h \
	ScintillaBase.h PropSet.h Accessor.h DocumentAccessor.h \
	KeyWords.h ExternalLexer.h PerLine.h

ScintillaWinL.obj: ScintillaWin.cxx Platform.h Scintilla.h SciLexer.h \
	ContractionState.h CellBuffer.h CallTip.h KeyMap.h Indicator.h \
	LineMarker.h Style.h AutoComplete.h ViewStyle.h Document.h Editor.h \
	ScintillaBase.h PropSet.h Accessor.h KeyWords.h \
	ExternalLexer.h UniConversion.h PerLine.h
ScintillaWinS.obj: ScintillaWin.cxx Platform.h Scintilla.h \
	ContractionState.h CellBuffer.h CallTip.h KeyMap.h Indicator.h \
	LineMarker.h Style.h AutoComplete.h ViewStyle.h Document.h Editor.h \
	ScintillaBase.h UniConversion.h PerLine.h

ScintillaBaseL.obj:
	$(CC) $(CXXFLAGS) -DSCI_LEXER -c $< -o$@

ScintillaWinS.obj:
	$(CC) $(CXXFLAGS) -DSTATIC_BUILD -c $< -o$@

ScintillaWinL.obj:
	$(CC) $(CXXFLAGS) -DSCI_LEXER -c $< -o$@

ScintRes.res: ScintRes.rc PlatformRes.h
	rcc -IZ:\dm\include -32 ScintRes.rc

$(COMPONENT):$(SOBJS) ScintRes.res Scintilla.def
	link $(SOBJS),$@,,KERNEL32.lib USER32.lib GDI32.lib IMM32.lib OLE32.LIB uuid.lib,Scintilla.def,ScintRes.res

$(LEXCOMPONENT):$(LOBJS) ScintRes.res Scintilla.def
	link $(LOBJS),$@,,KERNEL32.lib USER32.lib GDI32.lib IMM32.lib OLE32.LIB uuid.lib,Scintilla.def,ScintRes.res


	